import 'package:flutter_audit_app/ui/home/model/user_bean.dart';

///  项目名称：flutter_audit_app
///  Created by leon on 2020/10/22 .

///  分页的bean
///
class PageListBean {
  int page;
  List<UserBean> rows;
  int total;

  PageListBean({this.page, this.rows, this.total});

  PageListBean.fromJson(Map<String, dynamic> json) {
    page = json['page'];
    if (json['rows'] != null) {
      rows = new List<UserBean>();
      json['rows'].forEach((v) {
        rows.add(new UserBean.fromJson(v));
      });
    }
    total = json['total'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['page'] = this.page;
    if (this.rows != null) {
      data['rows'] = this.rows.map((v) => v.toJson()).toList();
    }
    data['total'] = this.total;
    return data;
  }
}
